package jaux.tank.admin.core.util;

import jaux.tank.admin.config.properties.TankProperties;
import jaux.tank.bean.vo.SpringContextHolder;

/**
 * 验证码工具类
 */
public class KaptchaUtil {

	private static   KaptchaUtil instance;
	
	
	private KaptchaUtil() {}
	
	public static KaptchaUtil getInstance() {
		if(instance == null) {
			instance = new KaptchaUtil();
		}
		return instance;
	}
	
    /**
     * 获取验证码开关
     *
     * @Date 2017/5/23 22:34
     */
    public static Boolean getKaptchaOnOff() {
        return SpringContextHolder.getBean(TankProperties.class).getKaptchaOpen();
    }
}